package com.huatai.bpmn.entity;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 *
 * @TableName tb_business
 */
@TableName(value ="tb_business",autoResultMap = true)
@Data
@ApiModel(value = "业务流水表实体类",description = "业务流水表实体类")
public class TbBusinessEntity implements Serializable {
	/**
	 * 主键id
	 */
	@TableId(value = "id",type = IdType.ASSIGN_ID)
	@ApiModelProperty("业务表id")
	private Long id;

	/**
	 * 流程实例id
	 */
	@ApiModelProperty("流程实例id")
	private String procinstId;

	/**
	 * 0:未完成 1:完成
	 */
	@ApiModelProperty("0:未完成 1:完成")
	private Integer status;

	/**
	 * 表单内容
	 */
	@ApiModelProperty("表单内容")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private JSONObject extend;


	/**
	 * 事项名称
	 */
	@ApiModelProperty("事项名称")
	private String matterName;

	/**
	 * 部署id
	 */
	@ApiModelProperty("部署id")
	private String deployId;

	/**
	 * 部署key
	 */
	@ApiModelProperty("部署key")
	private String deployKey;

	/**
	 * 创建用户
	 */
	@ApiModelProperty("创建用户")
	private String createUserid;

	/**
	 * 创建时间
	 */
	@ApiModelProperty("创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	/**
	 * 更新用户
	 */
	@ApiModelProperty("更新用户")
	private Long updateUserid;

	/**
	 * 更新时间
	 */
	@ApiModelProperty("更新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime updateTime;

	/**
	 * 逻辑删除标志(1:删除,0:未删除)
	 */
	@ApiModelProperty("逻辑删除标志(1:删除,0:未删除)")
	@TableLogic
	private Integer deleted;

	@ApiModelProperty("表单绑定id")
	private String externalParameterId;

	@TableField(exist = false)
	private Integer pageIndex;

	@TableField(exist = false)
	private Integer pageSize;

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

}
